package encapsulation;

import java.util.Scanner;

/**
 * @classname:AdministratorTest
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/28 10:24
 * @version: 0.1
 * @since:1.8
 */
public class AdministratorTest {
    public static void main(String[] args) {
        Administrator ad = new Administrator("admin",123);
        Scanner input = new Scanner(System.in);
        System.out.println("请输入用户名");
        String username = input.next();
        System.out.println("请输入密码");
        int password = input.nextInt();
        boolean register = ad.register(username,password);
        if(!register){
            System.out.println("登陆失败");
        }else{
            System.out.println("登陆成功");
        }

    }
}
